using Baik.Interface.Execution;
using Baik.Interface.Expression;
using Baik.Interface.Framework;

namespace Baik.Expression
{
    public class NumberLiteral : Expression, INumberLiteral
    {
        public NumberLiteral(IInjector inject) : base(inject)
        {
        }
        public override IObject Evaluate()
        {
            var rtn = Inject.Instantiate<INumber>();
            rtn.Value = Value;
            return rtn;
        }

        public string AsString()
        {
            return Value.ToString();
        }
        
        public double Value { get; set; }
    }
}